#include <stdio.h>
#include <string.h>

#define set_s(x,y) {strcpy(s[x].frefix,y);s[x].size=strlen(y);}
#define nmemb 3

struct test
{
	char frefix[20];
	int size;
}s[nmemb];

int main(void)
{
	FILE *stream;
	set_s(0, "Linux!");
	set_s(1, "FreeBSD!");
	set_s(2, "WindowsXP.");
	stream = fopen("/tmp/fwrite","w");
	fwrite(s, sizeof(struct test),nmemb,stream);
	fclose(stream);
}
